package units.monster;

///* ----------------------------------------------------------------------
// *	Shadow Quest
// *	Copyright (C) 2009 Prageeth Silva <prageeth@thenewcoders.com>
// *
// *  This program is free software: you can redistribute it and/or modify
// *  it under the terms of the GNU General Public License as published by
// *  the Free Software Foundation, either version 3 of the License, or
// *  (at your option) any later version.
// *
// *  This program is distributed in the hope that it will be useful,
// *  but WITHOUT ANY WARRANTY; without even the implied warranty of
// *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// *  GNU General Public License for more details.
// *
// *  You should have received a copy of the GNU General Public License
// *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
// *  ----------------------------------------------------------------------
// */
//
//package units.monster;
//
//import map.World;
//
//import org.newdawn.slick.Graphics;
//import org.newdawn.slick.Image;
//import org.newdawn.slick.SlickException;
//
///** Represents a Flying Monster character.
// *
// */
//public class FlyingMonster extends Monster
//{
//	
//	// common values of eat type of flying monster
//	public static double FLYING_SPEED = 0.15;
//	
//	public static int DEFAULT_FRAME_WIDTH = 120, DEFAULT_FRAME_HEIGHT = 120, DEFAULT_OFFSET_Y = 98;
//	
//	public static int DRAGON_MAX_HP = 200, DRAGON_DAMAGE = 10, DRAGON_RANGE_DAMAGE = 20, DRAGON_COOLDOWN = 1000;
//	
//	// frame dimensions
//	protected int WIDTH = 72, HEIGHT = 72;
//	
//	// the type of the flying monster
//	public enum FlyingMonsterType { DRAGON }
//	
//	private FlyingMonsterType type;			// the type of the instance
//	private static Image flyingBones;		// image to be drawn after the unit is dead
//	
//	/** Create a new FlyingMonster object
//     * @param type The type of Flying Monster
//     * @param world A reference to the world
//     * @param width The width of the animations frames
//     * @param height The height of the animation frames
//     */
//    public FlyingMonster(FlyingMonsterType type, World world, int width, int height)
//    throws SlickException
//    {
//    	// temporarily make the super class and then replace the images
//    	super(Monster.MonsterType.FLYING,width,height);
//    	this.setFlyingMonsterType(type);
//    	this.setSpeed(FLYING_SPEED);
//    	
//    	String dirPath = "";
//    	
//    	switch (type) {
//	  		case DRAGON:
//	  			dirPath = "assets/units/monsters/dragon/";
//				this.setMaxHP(DRAGON_MAX_HP);
//				this.setHP(DRAGON_MAX_HP);
//	  			this.setDamage(DRAGON_DAMAGE);
//				this.setRangeDamage(DRAGON_RANGE_DAMAGE);
//				this.setMaxCoolDown(DRAGON_COOLDOWN);
//				this.setName("Dragon");
//				break;
//    	}
//    	
//    	// load the images and make the monster look in random directions
//    	this.loadImages(dirPath);
//    	this.standInRandomDirection();
//    	// make the monster stick to a particular terrain type
//    	//this.restrictToCurrentTerrain(world);
//    	
//    }
//
//    /** Initialise FlyingMonster class
//     * 
//     */
//    public static void initFlyingMonster() 
//    throws SlickException 
//    {
//    	
//    	String dirPath = "assets/units/";
//    	setBonesImage(new Image(dirPath+"flying_bones.png"));
//    	
//    }
//    
//	public FlyingMonsterType getFlyingMonsterType() {
//		return this.type;
//	}
//
//	public void setFlyingMonsterType(FlyingMonsterType type) {
//		this.type = type;
//	}
//	
//	private static void setBonesImage(Image flyingBones) {
//		FlyingMonster.flyingBones = flyingBones;
//	}
//	
//	@Override
//	public Image getBonesImage() {
//		return flyingBones;
//	}
//	
//	/** Render the unit
//	 * @param g	The Graphics object
//	 * @param cameraOffsetX The x-coordinate of the camera position
//	 * @param cameraOffsetY The y-coordinate of the camera position
//	 */
//	@Override
//	public void render(Graphics g, double cameraOffsetX, double cameraOffsetY) {
//    	
//    	if (this.isAlive()) {
//    		if (this.isAppearing()) {
//        		this.getDisplayAnimation().draw((float)(this.getX()-cameraOffsetX-this.getDisplayAnimation().getCurrentFrame().getWidth()/2),(float)(this.getY()-cameraOffsetY-this.getDisplayAnimation().getCurrentFrame().getHeight()+this.getHeight()));
//        	} else {
//        		this.getDisplayAnimation().draw((float)(this.getX()-cameraOffsetX-this.getWidth()/2),(float)(this.getY()-cameraOffsetY-DEFAULT_OFFSET_Y));
//        	}
//    		if (this.isUsingAddon()) { this.getAddonAnimation().draw((float)(this.getX()-cameraOffsetX-this.getWidth()/2),(float)(this.getY()-cameraOffsetY-DEFAULT_OFFSET_Y)); }
//    	} else if (this.isTeleporting()) {
//    		this.getDisplayAnimation().draw((float)(this.getX()-cameraOffsetX-this.getDisplayAnimation().getCurrentFrame().getWidth()/2),(float)(this.getY()-cameraOffsetY-this.getDisplayAnimation().getCurrentFrame().getHeight()+this.getHeight()));
//    	} else if (this.isOnMap()) {
//    		Image img = this.getBonesImage();
//    		if (this.getDirection() == Direction.LEFT) { img = img.getFlippedCopy(true, false); }
//    		img.setAlpha((float)this.getDeadTimer()/SHOW_DEAD);
//    		img.draw((float)(this.getX()-cameraOffsetX-img.getWidth()/2), (float)(this.getY()-cameraOffsetY-img.getHeight()/2));
//    	}
//    	
//    }
//	
//	/** Get the frame height of the unit
//	 * 
//	 */
//	@Override
//	public double getHeight() {
//		return this.WIDTH;
//	}
//
//	/** Get the frame height of the unit
//	 * 
//	 */
//	@Override
//	public double getWidth() {
//		return this.HEIGHT;
//	}
//	
//	/** Render the display name and HP over the monster
//	 * @param g	The Graphics object
//	 * @param cameraOffsetX The x-coordinate of the camera position
//	 * @param cameraOffsetY The y-coordinate of the camera position
//	 */
//	@Override
//	public void renderDisplayNameAndHP(Graphics g, double cameraOffsetX, double cameraOffsetY) {
//    	super.renderDisplayNameAndHP(g, cameraOffsetX-(DEFAULT_FRAME_WIDTH-WIDTH)/2, cameraOffsetY+(DEFAULT_OFFSET_Y-HEIGHT/2));
//    }
//	
//}